// --------------------------------------------------------------------------------------------------------------------
// <copyright file="FormattedWithShould.cs" company="SaltFx">
//   Copyright (c) SaltFx - All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace SaltFx.Tests.StringExtensions
{
	using NUnit.Framework;

	using SaltFx.Extensions;

	/// <summary>
	/// StringExtensions FormattedWith method tests.
	/// </summary>
	[TestFixture]
	public class FormattedWithShould
	{
		#region Public Methods

		/// <summary>
		/// Tests to make sure strings are formatted.
		/// </summary>
		/// <param name="value">The string to insert.</param>
		[TestCase("99999")]
		[TestCase("ABC")]
		[TestCase("")]
		public void ReturnFormattedString(string value)
		{
			Assert.IsTrue(value.FormattedWith("AAA{0}ZZZ").Equals("AAA" + value + "ZZZ"));
		}

		/// <summary>
		/// Tests to make sure an exception is NOT thrown if there is no format token.
		/// </summary>
		[Test]
		public void NotThrowExceptionGivenNoFormatToken()
		{
			"ABC".FormattedWith("ZZZ");
		}

		#endregion
	}
}